IF EXISTS(SELECT name FROM sysobjects
      WHERE name = 'spAdvanceSearchDoctor' AND type = 'P')
   DROP PROC spAdvanceSearchDoctor
GO
CREATE PROCEDURE spAdvanceSearchDoctor 
	-- Add the parameters for the stored procedure here
@Name varchar(25)=null,
@Address varchar(100)= null,
@Speciality varchar(10)= null


AS
BEGIN
	Select * from Doctor where LastName like '%'+@Name+'%'
	and Address like '%'+@Address+'%'
	and Speciality like '%'+@Speciality+'%'
END
GO

exec spAdvanceSearchDoctor '','',''
